<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Registration</title>
</head>
<body>

<c:if test="${ empty user }">
	<form action="./RegistrationController" method="post" accept-charset="UTF-8"
		enctype="multipart/form-data">
		
		<table>
			<tr>
				<td><label for="emailAddress">Email</label></td>
				<td><input type="email" name="emailAddress"></td>
			</tr>
			<tr>
				<td><label for="password">Password</label></td>
				<td><input name="password" type="password"></td>
			</tr>
			<tr>
				<td><label for="profileImage">Choose profile image</label></td>
				<td><input name="profileImage" type="file" accept="image/jpeg,image/bmp,image/png"/></td>
			</tr>
			<tr>
				<td><label for="firstname">First name</label></td>
				<td><input type="text" name="firstname"></td>
			</tr>
			<tr>
				<td><label for="lastname">Last name</label></td>
				<td><input type="text" name="lastname"></td>
			</tr>
			<tr>
				<td><label for="gender">Gender</label></td>
				<td><select name="gender">
					<option value="MALE" selected="selected">Male</option>
					<option value="FEMALE">Female</option>
				</select></td>
			</tr>
			<tr>
				<td><label for="dateOfBirth">Date of birth</label></td>
				<td><input type="date" name="dateOfBirth"></td>
			</tr>
			<tr>
				<td><label for="emailNotifications">Email notifications</label></td>
				<td><input type="checkbox" name="emailNotifications"></td>
			</tr>
			<tr>
				<td><input type="submit" value="Register"></td>
			</tr>
		</table>
	</form>
</c:if>
<c:if test="${ not empty user }">
	<c:out value="Already logged in."></c:out>
	<a href="./LogoutController">Log out</a><br/>
</c:if>
<a href="./HomeController">Home</a> <br/>

</body>
</html>